<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			*{
				padding: 0;
				margin: 0;
			}
			
			div{
				width: 50%;
				height: 500px;
				border: 1px solid black;
				margin: 100px auto;
			}
			
			div img{
				width: 100%;
				height: 500px;
			}
		</style>
		
		<script>
			let imgs = [ 'img/yes.jpg', 'img/a.jpg', 'img/abcd.jpg', 'img/hello.jpg'];
			window.onload = function()
			{
				let div = document.querySelector('div');
				let img = document.querySelector('img');
				let i = 0;
				setInterval(function(){
					if(i == imgs.length)
					{
						i = 0;
					}
					div.innerHTML = `<img src = "${imgs[i]}" />`;
					i += 1;
				}, 1000);
			}
		</script>
	</head>
	<body>
		<div>
			
		</div>
	</body>
</html>